package com.nervenets.web.controller.news;

import com.nervenets.web.hibernate.domain.news.News;
import com.nervenets.web.hibernate.domain.news.Notice;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

@Data
public class NewsModel implements Serializable {
    @ApiModelProperty(value = "资讯ID")
    private long id;
    @ApiModelProperty(value = "创建时间")
    private int createTime;
    @ApiModelProperty(value = "资讯标题")
    private String title;

    public NewsModel(News news) {
        this.id = news.getId();
        this.createTime = news.getCreateTime();
        this.title = news.getTitle();
    }
}
